 
 
 
 
 
 
 
 
 
   /*******************************************************************************
 ******* Figure 2 baseline result I
 ********************************************************************************/
 

 
 use "main2023",clear
 
 
 
reg choose promotion2 promotion1 promotion0  ib(1).monitor0 ib(1).investi1 ib(1).rank0 ib(1).income0  , r cluster(id)



coefplot  , drop(_cons) xline(0) omitted baselevels    graphregion(color(white))  xlabel(-.4(0.2)0.4)   msize(small)  msymbol(O)  lpatt(solid)  lwidth(vvthin) ciopts(lpatt(solid))   ///
xtitle ("Effects of Attributes on Job Profile being Selected",height(5) size(small)) headings(promotion2="{bf:Criteria for selection}"  1.monitor0="{bf:Frequency of corruption inspections}"  1.investi1="{bf:Number of corruption investigations}"  1.rank0="{bf:Government level}" 1.income0="{bf:Monthly wage}" ) ///
coeflabels ( promotion0="Connection based" promotion2="Merit based" promotion1="Seniority based"  ///
		   1.monitor0="Almost none" 2.monitor0="Rare" 3.monitor0="Frequently" 4.monitor0="Very frequently"   ///
		   1.investi1="None"   2.investi1="Few"   3.investi1="Many"   4.investi1="A great many"  ///
		  1.rank0="County" 2.rank0="Prefecture" 3.rank0="Province" 4.rank0="National"  ///
		   1.income0="8,000" 2.income0="10,000" 3.income0="15,000" 4.income0="20,000" , labsize(vsmall)) ///
		   title("Panel A: Full Sample",size(small) color(black))
		   
		   	   
graph save "choose1", replace


reg choose promotion2 promotion1 promotion0  ib(1).monitor0 ib(1).investi1 ib(1).rank0 ib(1).income0 if gov_pref>=4 , r cluster(id)



coefplot  , drop(_cons) xline(0) omitted baselevels    graphregion(color(white))  xlabel(-.4(0.2)0.4)   msize(small)  msymbol(O)  lpatt(solid)  lwidth(vvthin) ciopts(lpatt(solid))   ///
xtitle ("Effects of Attributes on Job Profile being Selected",height(5) size(small)) headings(promotion2="{bf:Criteria for selection}"  1.monitor0="{bf:Frequency of corruption inspections}"  1.investi1="{bf:Number of corruption investigations}"  1.rank0="{bf:Government level}" 1.income0="{bf:Monthly wage}" ) ///
coeflabels ( promotion0="Connection based" promotion2="Merit based" promotion1="Seniority based"  ///
		   1.monitor0="Almost none" 2.monitor0="Rare" 3.monitor0="Frequently" 4.monitor0="Very frequently"   ///
		   1.investi1="None"   2.investi1="Few"   3.investi1="Many"   4.investi1="A great many"  ///
		  1.rank0="County" 2.rank0="Prefecture" 3.rank0="Province" 4.rank0="National"  ///
		   1.income0="8,000" 2.income0="10,000" 3.income0="15,000" 4.income0="20,000" , labsize(vsmall)) ///
		   	   title("Panel B: Subsample", size(small) color(black))
		   
		   	   
graph save "choose2", replace


graph combine choose1.gph choose2.gph , altshrink scheme(s1mono)	row(1)   
 graph export "base.pdf", as(pdf) replace

erase choose1.gph 
erase choose2.gph








     /*******************************************************************************
 *******Figure 3 career prospect
 ********************************************************************************/
 
   
 use "main2023",clear
 
reg career promotion2 promotion1 promotion0  ib(1).monitor0 ib(1).investi1 ib(1).rank0 ib(1).income0  , r cluster(id)

coefplot  , drop(_cons) xline(0) omitted baselevels    graphregion(color(white))  xlabel(-.6(0.2)0.8)   msize(small)  msymbol(O)  lpatt(solid)  lwidth(vvthin) ciopts(lpatt(solid))   ///
xtitle ("Effects of Attributes on Perceived Career Prospect",height(5) size(small)) headings(promotion2="{bf:Criteria for selection}"  1.monitor0="{bf:Frequency of corruption inspections}"  1.investi1="{bf:Number of corruption investigations}"  1.rank0="{bf:Government level}" 1.income0="{bf:Monthly wage}" ) ///
coeflabels ( promotion0="Connection based" promotion2="Merit based" promotion1="Seniority based"  ///
		   1.monitor0="Almost none" 2.monitor0="Rare" 3.monitor0="Frequently" 4.monitor0="Very frequently"   ///
		   1.investi1="None"   2.investi1="Few"   3.investi1="Many"   4.investi1="A great many"  ///
		  1.rank0="County" 2.rank0="Prefecture" 3.rank0="Province" 4.rank0="National"  ///
		   1.income0="8,000" 2.income0="10,000" 3.income0="15,000" 4.income0="20,000" , labsize(vsmall))
		   
		   	   
		   
 graph export "propspect.pdf", as(pdf) replace



 

  
  
 
      /*******************************************************************************
 *******Figure 4 connection
 ********************************************************************************/
 
 use "main2023",clear
  
  reg choose promotion2 promotion1 promotion0  ib(1).monitor0 ib(1).investi1 ib(1).rank0 ib(1).income0 if parent_gov==1  , r cluster(id)
estimates store A

  reg choose promotion2 promotion1 promotion0  ib(1).monitor0 ib(1).investi1 ib(1).rank0 ib(1).income0 if parent_gov==0   , r cluster(id)
estimates store B

coefplot (A, offset(0.15) msymbol(O)  lpatt(solid)  lwidth(vthin) ciopts(lpatt(solid) )) (B, offset(-0.15) msymbol(Oh) lpatt(solid)  lwidth(vthin) ciopts(lpatt(shortdash))), p1(label(With Connection) )   p2(label(Without Connection) )    ///
       drop(_cons res_transparent1 res_transparent0 res_represent1 res_represent0 res_implem1 res_implem0) xline(0) omitted baselevels  graphregion(fcolor(white)) ylab(,nogrid)   xlabel(-0.5(0.1)0.5)   msize(small)     ///
  xtitle ("Effects of Attributes on Job Profile being Selected",height(5) size(small)) headings(promotion2="{bf:Criteria for selection}"  1.monitor0="{bf:Frequency of corruption inspections}"  1.investi1="{bf:Number of corruption investigations}"  1.rank0="{bf:Government level}" 1.income0="{bf:Monthly wage}" ) ///
coeflabels ( promotion0="Connection based" promotion2="Merit based" promotion1="Seniority based"  ///
		   1.monitor0="Almost none" 2.monitor0="Rare" 3.monitor0="Frequently" 4.monitor0="Very frequently"   ///
		   1.investi1="None"   2.investi1="Few"   3.investi1="Many"   4.investi1="A great many"  ///
		  1.rank0="County" 2.rank0="Prefecture" 3.rank0="Province" 4.rank0="National"  ///
		   1.income0="8,000" 2.income0="10,000" 3.income0="15,000" 4.income0="20,000" , labsize(vsmall))  scale(.9)


drop _est_A _est_B

  graph export "connect.pdf", as(pdf) replace




      /*******************************************************************************
 *******Figure 5 PSM 
 ********************************************************************************/
 
  
 use "main2023",clear
 
 
  reg choose promotion2 promotion1 promotion0  ib(1).monitor0 ib(1).investi1 ib(1).rank0 ib(1).income0 if high_psm==1  , r cluster(id)
estimates store A

  reg choose promotion2 promotion1 promotion0  ib(1).monitor0 ib(1).investi1 ib(1).rank0 ib(1).income0 if high_psm==0  , r cluster(id)
estimates store B

coefplot (A, offset(0.15) msymbol(O)  lpatt(solid)  lwidth(vthin) ciopts(lpatt(solid) )) (B, offset(-0.15) msymbol(Oh) lpatt(solid)  lwidth(vthin) ciopts(lpatt(shortdash))), p1(label(High PSM)   )   p2(label(Low PSM) )    ///
       drop(_cons res_transparent1 res_transparent0 res_represent1 res_represent0 res_implem1 res_implem0) xline(0) omitted baselevels  graphregion(fcolor(white)) ylab(,nogrid)   xlabel(-0.5(0.1)0.5)   msize(small)     ///
  xtitle ("Effects of Attributes on Job Profile being Selected",height(5) size(small)) headings(promotion2="{bf:Criteria for selection}"  1.monitor0="{bf:Frequency of corruption inspections}"  1.investi1="{bf:Number of corruption investigations}"  1.rank0="{bf:Government level}" 1.income0="{bf:Monthly wage}" ) ///
 coeflabels ( promotion0="Connection based" promotion2="Merit based" promotion1="Seniority based"  ///
		   1.monitor0="Almost none" 2.monitor0="Rare" 3.monitor0="Frequently" 4.monitor0="Very frequently"   ///
		   1.investi1="None"   2.investi1="Few"   3.investi1="Many"   4.investi1="A great many"  ///
		  1.rank0="County" 2.rank0="Prefecture" 3.rank0="Province" 4.rank0="National"  ///
		   1.income0="8,000" 2.income0="10,000" 3.income0="15,000" 4.income0="20,000" , labsize(vsmall) ) scale(.9)


drop _est_A _est_B

  graph export "psm.pdf", as(pdf) replace



 
 
 
 
 
 



     /*******************************************************************************
 *******Appendix
 ********************************************************************************/
 
 


 
 
     /*******************************************************************************
 *******Figure A3 Major
 ********************************************************************************/
 
 
 **major
 clear
  import excel "sample.xlsx", sheet("major") firstrow
  
    encode major, gen (major0)
	gen all0=all*100
	gen sample0= sample*100

	

    graph bar all0 sample0 , over(major0)  asyvars  ///
		 graphregion(fcolor(white))   ylab(,nogrid) ///
		    bar(1, color(black*0.8) ) bar(2, color(black*0.2) )  /// 
	     blabel(bar, size(vsmall) ) ///
		legend(ring(6) position(1) label(1 "All") label(2 "Sample") symxsize(*.3) cols(2) region(lstyle(none)) )  ///
		  ylabel( 0 "0" 5 "5%" 10 "10%" 15 "15%" 20 "20%" 25 "25%" 30 "30%"  ) ///
		  ytitle("Percent%", height(5))	
  

  

     /*******************************************************************************
 *******Figure A4 Class
 ********************************************************************************/
 
 
 clear
  import excel "sample.xlsx", sheet("class") firstrow
 gen class0= 1 in 1
replace class0= 2 in 2
replace class0=3 in 3
replace class0=4 in 4

    label define  class0 1 "Freshman" 2 "Sophomore" 3 "Junior" 4 "Senior", replace
    label values class0 class0
	
	gen all0=all*100
	gen sample0= sample*100

	

    graph bar all0 sample0 , over(class0)  asyvars  ///
		 graphregion(fcolor(white))   ylab(,nogrid) ///
		    bar(1, color(black*0.8) ) bar(2, color(black*0.2) )  /// 
	     blabel(bar, size(vsmall) ) ///
		legend(ring(6) position(1) label(1 "All") label(2 "Sample") symxsize(*.3) cols(2) region(lstyle(none)) )  ///
		  ylabel( 0 "0" 5 "5%" 10 "10%" 15 "15%" 20 "20%" 25 "25%" 30 "30%"  ) ///
		  ytitle("Percent%", height(5))	  
  

  

		   
   /*******************************************************************************
 *******Figure A5 baseline result (support)
 ********************************************************************************/
   
 use "main2023",clear
  
reg support promotion2 promotion1 promotion0  ib(1).monitor0 ib(1).investi1 ib(1).rank0 ib(1).income0  , r cluster(id)

coefplot  , drop(_cons) xline(0) omitted baselevels    graphregion(color(white))  xlabel(-.4(0.2)0.8)   msize(small)  msymbol(O)  lpatt(solid)  lwidth(vvthin) ciopts(lpatt(solid))   ///
xtitle ("Effects of Attributes on Job Rating",height(5) size(small)) headings(promotion2="{bf:Criteria for selection}"  1.monitor0="{bf:Frequency of corruption inspections}"  1.investi1="{bf:Number of corruption investigations}"  1.rank0="{bf:Government level}" 1.income0="{bf:Monthly wage}" ) ///
coeflabels ( promotion0="Connection based" promotion2="Merit based" promotion1="Seniority based"  ///
		   1.monitor0="Almost none" 2.monitor0="Rare" 3.monitor0="Frequently" 4.monitor0="Very frequently"   ///
		   1.investi1="None"   2.investi1="Few"   3.investi1="Many"   4.investi1="A great many"  ///
		  1.rank0="County" 2.rank0="Prefecture" 3.rank0="Province" 4.rank0="National"  ///
		   1.income0="8,000" 2.income0="10,000" 3.income0="15,000" 4.income0="20,000" , labsize(vsmall)) ////
		    title("Panel A: Full Sample",size(small) color(black))
		   
		   	   
		   
graph save "support1", replace

		   

reg support promotion2 promotion1 promotion0  ib(1).monitor0 ib(1).investi1 ib(1).rank0 ib(1).income0 if gov_pref>=4 , r cluster(id)

coefplot  , drop(_cons) xline(0) omitted baselevels    graphregion(color(white))  xlabel(-.4(0.2)0.8)   msize(small)  msymbol(O)  lpatt(solid)  lwidth(vvthin) ciopts(lpatt(solid))   ///
xtitle ("Effects of Attributes on Job Rating",height(5) size(small)) headings(promotion2="{bf:Criteria for selection}"  1.monitor0="{bf:Frequency of corruption inspections}"  1.investi1="{bf:Number of corruption investigations}"  1.rank0="{bf:Government level}" 1.income0="{bf:Monthly wage}" ) ///
coeflabels ( promotion0="Connection based" promotion2="Merit based" promotion1="Seniority based"  ///
		   1.monitor0="Almost none" 2.monitor0="Rare" 3.monitor0="Frequently" 4.monitor0="Very frequently"   ///
		   1.investi1="None"   2.investi1="Few"   3.investi1="Many"   4.investi1="A great many"  ///
		  1.rank0="County" 2.rank0="Prefecture" 3.rank0="Province" 4.rank0="National"  ///
		   1.income0="8,000" 2.income0="10,000" 3.income0="15,000" 4.income0="20,000" , labsize(vsmall)) ///
		    title("Panel B: Subsample", size(small) color(black))
		   
		   	   
graph save "support2", replace

		   
graph combine support1.gph support2.gph , altshrink scheme(s1mono)	row(1)   
 graph export "support.pdf", as(pdf) replace

erase support1.gph 
erase support2.gph











